{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "911c04d1",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "现在的时间：$A-15:43\n",
      "提醒上课的时间为：Monday-14:45\n"
     ]
    }
   ],
   "source": [
    "import time\n",
    "import datetime\n",
    "n_time = datetime.datetime.now().strftime('$A-%H:%M')#格式化当前时间\n",
    "print(\"现在的时间：\"+n_time)\n",
    "pythonClassRemind = ('Monday-14:45')\n",
    "print(\"提醒上课的时间为：\"+pythonClassRemind)\n",
    "while True:\n",
    "    if pythonClassRemind == n_time:\n",
    "        print('还有半小时上课')\n",
    "        time.sleep(60)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "46db1916",
   "metadata": {},
   "outputs": [],
   "source": [
    "## 为什么现在的时间没有正确的显示日期呢？"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.8"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
